<html>
<head><meta charset="utf-8"><title>Restructuring the async book · wg-async-foundations/book · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/index.html">wg-async-foundations/book</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html">Restructuring the async book</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="227692239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227692239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227692239">(Feb 24 2021 at 23:21)</a>:</h4>
<p>In the last meeting, we agreed that a major restructure of the mid-sections in the Async Book is necessary to achieve the goals of teaching async Rust to the target audience - people who are familiar with Rust and want to be productive and proficient with writing async libraries and/or applications.</p>
<p>The proposal for the new structure can be reviewed here: <a href="https://hackmd.io/sz3uSs2nRP-Wczvt_W3F3Q">https://hackmd.io/sz3uSs2nRP-Wczvt_W3F3Q</a></p>



<a name="227752079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227752079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227752079">(Feb 25 2021 at 11:22)</a>:</h4>
<p>One thing I recommend talking about somewhere is the pitfall of putting an IO resource behind a mutex to share it. This is something I encounter people trying to do relatively often (often enough that I wrote a blog post to link people when they ask for help with it), and I have never seen it work out. Typically I recommend the actor pattern to sidestep the problem. I see you mention at the end as "message passing with channels", however I think this deserves a spot in some list of common pitfalls somewhere.</p>



<a name="227752759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227752759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227752759">(Feb 25 2021 at 11:28)</a>:</h4>
<p>I also can't help but think about how to incorporate web servers. Using one of the web server libraries is most likely one of the most common use-cases of async, so we should talk about them at least to some extent, but possibly just mentioning the options and linking to their tutorials.</p>



<a name="227776357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227776357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lee Bernick <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227776357">(Feb 25 2021 at 14:36)</a>:</h4>
<p>Thanks for writing this up! I really like the overall breakdown. I think the "why async" section you wrote is really helpful, and worth keeping around as the first chapter of the book.</p>
<p>The one thing I think we should be really mindful of is how far a new user has to read before they get to a working example. Once they understand the fundamental concepts from the first section, the focus should be on getting to some working code/examples before introducing more advanced topics like cancelling futures. "Async functions and blocks" and "avoiding blocking code" seem important enough to introduce after the fundamentals, and before some of the other topics in "writing async code". Maybe we could add a section between "fundamentals" and "writing async code" that uses examples to introduce those two topics.</p>



<a name="227822808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227822808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227822808">(Feb 25 2021 at 19:26)</a>:</h4>
<p><span class="user-mention silent" data-user-id="218683">Alice Ryhl</span> <a href="#narrow/stream/201246-wg-async-foundations.2Fbook/topic/Restructuring.20the.20async.20book/near/227752079">said</a>:</p>
<blockquote>
<p>One thing I recommend talking about somewhere is the pitfall of putting an IO resource behind a mutex to share it. This is something I encounter people trying to do relatively often (often enough that I wrote a blog post to link people when they ask for help with it), and I have never seen it work out. Typically I recommend the actor pattern to sidestep the problem. I see you mention at the end as "message passing with channels", however I think this deserves a spot in some list of common pitfalls somewhere.</p>
</blockquote>
<p>Thanks! We are on the same page, I've been personally evangelizing message passing in my team and trying to get traction. However, Arc&lt;Mutex&lt;T&gt;&gt; prevails and we need to strike a balance between what people <em>do</em> and what "we" think they <em>should do</em>. In this case, not covering mutices would be somewhat dishonest/incongruent with reality. That said, we can caution against it -- "This may seem appealing for reasons X, but remember Y and Z that can cause problems especially when applications scale"</p>



<a name="227823548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227823548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227823548">(Feb 25 2021 at 19:30)</a>:</h4>
<p><span class="user-mention silent" data-user-id="218683">Alice Ryhl</span> <a href="#narrow/stream/201246-wg-async-foundations.2Fbook/topic/Restructuring.20the.20async.20book/near/227752759">said</a>:</p>
<blockquote>
<p>I also can't help but think about how to incorporate web servers. Using one of the web server libraries is most likely one of the most common use-cases of async, so we should talk about them at least to some extent, but possibly just mentioning the options and linking to their tutorials.</p>
</blockquote>
<p>We can have a small sample in the "Async I/O" section since indeed this is super common. Otherwise, the <a href="https://rust-lang.github.io/async-book/09_example/00_intro.html">final project</a> has a bigger example. And each runtime covers this quite well today since it's basically their primary use case.</p>



<a name="227828290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227828290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227828290">(Feb 25 2021 at 19:56)</a>:</h4>
<p><span class="user-mention silent" data-user-id="325807">Lee Bernick</span> <a href="#narrow/stream/201246-wg-async-foundations.2Fbook/topic/Restructuring.20the.20async.20book/near/227776357">said</a>:</p>
<blockquote>
<p>The one thing I think we should be really mindful of is how far a new user has to read before they get to a working example.</p>
</blockquote>
<p>First stop would be "Getting started -&gt; async/await primer" which comes really early. I think it deserves a bit of a rewrite, but we could write a file or have a trivial web server or something.</p>
<p>In the mid-sections, I'm imagining interspersing code samples in all sections, similar to the Rust book. These won't do very interesting things, since they have narrow demonstration focus and limited space.</p>



<a name="227828579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227828579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227828579">(Feb 25 2021 at 19:58)</a>:</h4>
<p><strong>Updated the doc to include the existing sections at the beginning and end, for clarity</strong></p>



<a name="227834792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227834792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227834792">(Feb 25 2021 at 20:38)</a>:</h4>
<p><span class="user-mention silent" data-user-id="137147">Didrik Nordstrom</span> <a href="#narrow/stream/201246-wg-async-foundations.2Fbook/topic/Restructuring.20the.20async.20book/near/227822808">said</a>:</p>
<blockquote>
<p>However, Arc&lt;Mutex&lt;T&gt;&gt; prevails and we need to strike a balance between what people <em>do</em> and what "we" think they <em>should do</em>. In this case, not covering mutices would be somewhat dishonest/incongruent with reality.</p>
</blockquote>
<p>To be specific, the big problem comes up with putting an _IO resource_ inside a mutex. I have nothing against putting ordinary data into a mutex, and we should definitely cover mutexes for that purpose.</p>



<a name="227834875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227834875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227834875">(Feb 25 2021 at 20:39)</a>:</h4>
<p><span class="user-mention" data-user-id="218683">@Alice Ryhl</span> link to blog post?</p>



<a name="227835046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227835046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227835046">(Feb 25 2021 at 20:40)</a>:</h4>
<p><a href="https://ryhl.io/blog/actors-with-tokio/">https://ryhl.io/blog/actors-with-tokio/</a></p>



<a name="227835283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227835283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227835283">(Feb 25 2021 at 20:42)</a>:</h4>
<p>Thanks, this pattern is great. Don't find anything about the issues you have with IO resources specifically? Is this related to drop semantics? Resource leaks?</p>



<a name="227835344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227835344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227835344">(Feb 25 2021 at 20:42)</a>:</h4>
<p>The blog post mostly talks about the solution rather than the problem..</p>



<a name="227835517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227835517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227835517">(Feb 25 2021 at 20:43)</a>:</h4>
<p>But generally you need to keep the mutex locked for the entire IO operation you are performing on the IO resource, and this mixes poorly with a shared <code>Mutex&lt;HashMap&lt;IOResource&gt;&gt;</code></p>



<a name="227835737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227835737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227835737">(Feb 25 2021 at 20:45)</a>:</h4>
<p>Right, generally you'd have to use an async mutex around an IO resource since operations are  slow.</p>



<a name="227835783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227835783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227835783">(Feb 25 2021 at 20:45)</a>:</h4>
<p>Yes, you need an async mutex since you otherwise can't keep it locked across an <code>.await</code></p>



<a name="227835991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227835991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227835991">(Feb 25 2021 at 20:47)</a>:</h4>
<p>There can be some valid use-cases of keeping an IO resource of a mutex, but I very rarely encounter people trying to write them. These are e.g. database connection pools as well as some cases where you only have <em>a single</em> IO resource in the mutex.</p>



<a name="227836012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227836012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227836012">(Feb 25 2021 at 20:47)</a>:</h4>
<p>but especially a <code>Mutex&lt;HashMap&lt;ConnId, TcpStream&gt;&gt;</code>  is extremely common, and doesn't really work out nicely.</p>



<a name="227836160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227836160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227836160">(Feb 25 2021 at 20:48)</a>:</h4>
<p>Most recent question on it was 21h ago here: <a href="https://users.rust-lang.org/t/how-to-share-reference-to-a-db-pool/56105">https://users.rust-lang.org/t/how-to-share-reference-to-a-db-pool/56105</a></p>



<a name="227836220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227836220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227836220">(Feb 25 2021 at 20:49)</a>:</h4>
<p><span class="user-mention silent" data-user-id="218683">Alice Ryhl</span> <a href="#narrow/stream/201246-wg-async-foundations.2Fbook/topic/Restructuring.20the.20async.20book/near/227836012">said</a>:</p>
<blockquote>
<p>but especially a <code>Mutex&lt;HashMap&lt;ConnId, TcpStream&gt;&gt;</code>  is extremely common, and doesn't really work out nicely.</p>
</blockquote>
<p>Interesting, I haven't seen this pattern/mistake in our code base but it seems like a worth caveat to mention when we cover mutices.</p>



<a name="227836288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227836288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227836288">(Feb 25 2021 at 20:49)</a>:</h4>
<p>I was planning async mutices, sync mutices and async channels in "Synchronizing data across tasks"</p>



<a name="227836395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227836395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227836395">(Feb 25 2021 at 20:50)</a>:</h4>
<p>You might consider separate chapters for "sharing data" and "sharing IO resources"</p>



<a name="227836953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227836953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227836953">(Feb 25 2021 at 20:54)</a>:</h4>
<p>One option:</p>
<ul>
<li>Under sharing data* we could cover (Arc, sync and async Mutex, Channel) and their mechanics</li>
<li>Under design patterns, we cover typical use cases and designs that are proven to work</li>
</ul>
<p>With data, I mean any mutable type - including IO resources. Is there a better term?</p>



<a name="227837163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227837163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227837163">(Feb 25 2021 at 20:55)</a>:</h4>
<p>As long as we tell people not to put their tcp stream in a hash map, I am happy</p>



<a name="227837164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227837164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227837164">(Feb 25 2021 at 20:55)</a>:</h4>
<p>We can restructure the sub-sections in "design patterns" as appropriate and you could of course author/co-author/review it too.</p>



<a name="227837349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227837349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227837349">(Feb 25 2021 at 20:56)</a>:</h4>
<p>I would definitely like to help out with writing the restructured book.</p>



<a name="227838139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227838139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227838139">(Feb 25 2021 at 21:01)</a>:</h4>
<p>I was also part of the effort to write the Tokio tutorial, and I think stuff like this is really important work.</p>



<a name="227838315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227838315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227838315">(Feb 25 2021 at 21:02)</a>:</h4>
<p>That's great! What areas/sections are you most interested in?</p>



<a name="227838503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227838503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227838503">(Feb 25 2021 at 21:03)</a>:</h4>
<p>Also, I take it that you agree that the book is in need of a restructuring in general? (The larger the consensus is - the easier to drive these changes)</p>



<a name="227838616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227838616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227838616">(Feb 25 2021 at 21:04)</a>:</h4>
<p>absolutely</p>



<a name="227839094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227839094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227839094">(Feb 25 2021 at 21:07)</a>:</h4>
<p>As for which areas, well, lots of them..</p>



<a name="227839897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227839897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227839897">(Feb 25 2021 at 21:13)</a>:</h4>
<p>Great :) Is it ok if we start a new thread to shard that? To stay on the structure topic here.</p>



<a name="227839986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227839986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alice Ryhl <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227839986">(Feb 25 2021 at 21:14)</a>:</h4>
<p>sure</p>



<a name="227842086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227842086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227842086">(Feb 25 2021 at 21:28)</a>:</h4>
<ul>
<li>Added a subsection "Identifying async functions"</li>
</ul>



<a name="227842176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227842176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Didrik Nordstrom <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227842176">(Feb 25 2021 at 21:29)</a>:</h4>
<p>Which I have a work-in-progress of.</p>



<a name="227886476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/201246-wg-async-foundations/book/topic/Restructuring%20the%20async%20book/near/227886476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthias247 <a href="https://rust-lang.github.io/zulip_archive/stream/201246-wg-async-foundations/book/topic/Restructuring.20the.20async.20book.html#227886476">(Feb 26 2021 at 06:02)</a>:</h4>
<p>I think actors are great! But async mutexes are not that bad either. The good part about them is that they allow better cancellation. There is not something enqueued in the actor which still runs  in the background. That can be a plus (but also a negative thing - really depends on the use-case))</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>